package cn.javasea.atomikos.user;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/test")
public class DemoController {

	@Autowired
	UserService userService;

	@GetMapping(value = "/get/{name}")
	public List<User> testMybatis(@PathVariable("name") String name) {
		return userService.getUserInfoByUserName(name);
	}

	@GetMapping(value = "/update")
	public List<User> update(User userInfo) {
		return userService.update(userInfo);
	}
}
